/**
 * 
 */
package org.heydr.datacenter.db;

import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

public class DataPool {
	
	private static ConcurrentMap<String,Set<String>> map = new ConcurrentHashMap<String,Set<String>>();
	
	public static boolean isDuplicate(String site,String md5Url){
		return addDuplicateData(site,md5Url);
	}
	
	public static boolean addDuplicateData(String site,String md5Url){
		if(!map.containsKey(site)){
			map.put(site, new HashSet<String>());
		}
		return map.get(site).add(md5Url);
	}
	
}
